package com.geekaca.d4.d3;

import java.time.LocalDateTime;

public class QiangDan {
    public static void main(String[] args) {
        LocalDateTime orderTime = LocalDateTime.of(2023, 6, 20, 14, 0, 0);
        LocalDateTime tomOrder = LocalDateTime.of(2023, 6, 20, 14, 0, 10);
        LocalDateTime jerryOrder = LocalDateTime.of(2023, 6, 20, 13, 59, 59);

        boolean isBefore1 = tomOrder.isBefore(orderTime);
        boolean isBefore2 = jerryOrder.isBefore(orderTime);

        if (isBefore1) {
            System.out.printf("Tom 抢单成功");
        }
        if (isBefore2) {
            System.out.println("Jerry 抢单成功");
        }
    }
}
